package apcsif;
  


/**
 * Write a description of class On_The_Wall_Runner here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
import java.util.Scanner;

public class On_The_Wall_Runner {
	public static void main(String[] args) {
	    Parser p = new Parser();
		String name;
		Scanner scan = new Scanner(System.in);
		System.out.println("===========================");
		System.out.println("\tOn The Wall");
		System.out.println("===========================");

		System.out.println("\tPress Enter");
		scan.nextLine();
		System.out.println("\nWhat is your name");
		System.out.print(">");
		name = scan.nextLine();
		Globals.newPlayer(name);
		System.out
				.println("You get bored in class so you open up the zip that Josh and Andrew sent you. \n"
						+ "In it you find a file called On_The_Wall_Runner.java. You haven't done \nanything productive in "
						+ "APCompSci for a long time now \nso you decide to run it. The console pops up.\n");
		scan.nextLine();
		
		System.out.print("Computer: ");
		Sys.sp("Hello " + name);
		Sys.sp("We have been waiting for you");
		scan.nextLine();
		System.out.println("\nThe world spins around as the darkness absorbs you.");
		scan.nextLine();
		System.out.print(".");
		Sys.delay(1);
		System.out.print(".");
		Sys.delay(1);
		System.out.println(".");
		scan.nextLine();
		System.out.println("When you come to, you are still sitting at the computer. "
						+ "\nYou grogily shake your head to wake yourself up.");
		scan.nextLine();
		Sys.sp("Mr. Echols: WHAT ARE YOU DOING?!?");
		Sys.delay(1);
		Sys.sp("WE WORK TOO HARD IN THIS CLASS! IF YOU'RE PLAYING GAMES THEN LEAVE!!!");
		Sys.sp("Get me a Pepsi Max while your at it!");
		System.out.print("What do you say?\n>");
		scan.nextLine();
		System.out.println("Mr. Echcols' eyes flare as he forcefuly shoves you out of the classroom\n\n");
		Sys.sp("Gary would know what to do. I should go find him in the robotics room");
		System.out.println("WARNING: BE CAREFUL WHAT YOU TYPE! THE PARSER CAN BE PICKY AT TIMES!\n");
		scan.nextLine();
		System.out.println("Items MUST be equipped in order to be used");
		scan.nextLine();
		System.out.println("If you would like help with commnds, type \"help\" or \"h\"");
		p.parse("l");
		System.out.print(">");

		
		boolean meGivingADamn = false;
		while (meGivingADamn == false) {
			String in = scan.nextLine();
			in = in.toLowerCase();
			p.setParam(Sys.split2(in));
			p.parse(Sys.split1(in));
			System.out.print(">");
		}
		scan.close();
	}
}
